package cn.yikaojiuguo.student.bean;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

import java.io.Serializable;

/**
 * Created by cfan_yang on 2015/12/14.
 * Volley缓存对象
 */
@Table(name = "cache", onCreated = "CREATE UNIQUE INDEX index_name ON cache(time)")
public class Cache implements Serializable {

    private static final long serialVersionUID = -36382511259423870L;

    public Cache() {
        super();
    }
    @Column(name = "id", isId = true)
    private int id;
    @Column(name = "requestUrl")
    public String requestUrl;
    @Column(name = "jsonString")
    public String jsonString;
    @Column(name = "time")
    public long time;

    public Cache(String requestUrl, String jsonString) {
        this.requestUrl = requestUrl;
        this.jsonString = jsonString;
        time = System.currentTimeMillis();
    }
}
